cmake_minimum_required (VERSION 2.8.11)
if(APPLE)
set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++")
endif()

set (ROOT_DIR ..)
set (INCLUDE_DIR include)
set (INCLUDE_PUBLIC_DIR ${INCLUDE_DIR}/public)

add_subdirectory (Window)
add_subdirectory (Renderer)

include_directories (
	${INCLUDE_DIR}
	${INCLUDE_PUBLIC_DIR}
)

# File groups
set (PUBLIC_INCLUDE_FILES
	${INCLUDE_PUBLIC_DIR}/common.h
	${INCLUDE_PUBLIC_DIR}/ExtException.h
	${INCLUDE_PUBLIC_DIR}/IGameEngine.h
	${INCLUDE_PUBLIC_DIR}/IRenderContext.h
	${INCLUDE_PUBLIC_DIR}/IWindow.h
)

set (ENGINE_FILES
	GameEngine.h
	GameEngine.cpp
)

add_definitions(-DVENGINE_EXPORT)

# Create library project
add_library (VEngine SHARED
	${PUBLIC_INCLUDE_FILES}
	${ENGINE_FILES}
)

# Create layout for files inside VS/XCode
source_group ("include"	 FILES ${PUBLIC_INCLUDE_FILES})
source_group ("" 		 FILES ${ENGINE_FILES})

target_link_libraries (VEngine VEngineRenderer VEngineWindow)

